package com.aspose.cells;

public class IconSet {
   int a = 6;
   private boolean c = true;
   private boolean d = false;
   private boolean e = true;
   ConditionalFormattingIconCollection b = null;
   private ConditionalFormattingValueCollection f;
   private FormatCondition g = null;

   public ConditionalFormattingIconCollection getCfIcons() {
      if (this.b == null) {
         int var1 = this.f.getCount();
         this.b(var1);
      }

      return this.b;
   }

   IconSet(FormatCondition formatCond) {
      this.g = formatCond;
      this.f = new ConditionalFormattingValueCollection(formatCond);
      this.f.c = true;
   }

   private void b(int var1) {
      this.b = new ConditionalFormattingIconCollection();

      for(int var2 = 0; var2 < var1; ++var2) {
         ConditionalFormattingIcon var3 = new ConditionalFormattingIcon(this.a, var2);
         this.b.add(var3);
      }

   }

   void a(IconSet var1, CopyOptions var2, int var3, int var4) {
      this.c = var1.c;
      this.e = var1.e;
      this.d = var1.d;
      this.a = var1.a;
      this.f.a(var1.f, var2, var3, var4);
      if (var1.b != null && var1.b.getCount() > 0) {
         this.b = new ConditionalFormattingIconCollection();
         this.b.a(var1.b);
      }

   }

   static IconSet a(FormatCondition var0) {
      IconSet var1 = new IconSet(var0);
      var1.setType(6);
      return var1;
   }

   private void c(int var1) {
      if (var1 == 3) {
         this.f.a(new ConditionalFormattingValue(this.g, 4, 0));
         this.f.a(new ConditionalFormattingValue(this.g, 4, 33));
         this.f.a(new ConditionalFormattingValue(this.g, 4, 67));
      } else if (var1 == 4) {
         this.f.a(new ConditionalFormattingValue(this.g, 4, 0));
         this.f.a(new ConditionalFormattingValue(this.g, 4, 25));
         this.f.a(new ConditionalFormattingValue(this.g, 4, 50));
         this.f.a(new ConditionalFormattingValue(this.g, 4, 75));
      } else if (var1 == 5) {
         this.f.a(new ConditionalFormattingValue(this.g, 4, 0));
         this.f.a(new ConditionalFormattingValue(this.g, 4, 20));
         this.f.a(new ConditionalFormattingValue(this.g, 4, 40));
         this.f.a(new ConditionalFormattingValue(this.g, 4, 60));
         this.f.a(new ConditionalFormattingValue(this.g, 4, 80));
      }

   }

   public ConditionalFormattingValueCollection getCfvos() {
      return this.f;
   }

   public int getType() {
      return this.isCustom() ? 21 : this.a;
   }

   public void setType(int value) {
      this.a = value;
      this.b = null;
      int var2 = zase.W(this.a);
      int var3 = this.f.getCount();

      try {
         if (var3 != var2) {
            this.f.clear();
            this.c(var2);
         }
      } catch (Exception var5) {
         ;
      }

   }

   public boolean isCustom() {
      return this.b != null && this.b.getCount() != 0;
   }

   void a(int var1) {
      this.a = var1;
   }

   public boolean getShowValue() {
      return this.c;
   }

   public void setShowValue(boolean value) {
      this.c = value;
   }

   public boolean getReverse() {
      return this.d;
   }

   public void setReverse(boolean value) {
      this.d = value;
   }
}
